﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="com.hundsun.jres.bizframe.core.framework.util.MenuUtil"%>
<%@page import="com.hundsun.jres.bizframe.core.authority.bean.SysMenu"%>
<%@page import="java.util.*"%>
<%@page import="com.hundsun.jres.bizframe.core.authority.cache.*"%>
<%@page import="com.hundsun.jres.bizframe.core.authority.constants.SessionConstants"%>
<%!boolean needInclude(Map uerMenuMap, String menuCode) {
		if (uerMenuMap.containsKey(menuCode)
				&& "xtype".equalsIgnoreCase((String) uerMenuMap.get(menuCode))) {
			return true;
		}
		return false;
	}%>
<%
	UserInfo currUser = (UserInfo)session.getAttribute(SessionConstants.ARRT_CURR_USER);
	List<String> allMenuCodes = currUser.getMehuCache().getAllMenuCodes();
	Map uerMenuMap = new HashMap();
	boolean hasXtype = false;
	for(String menuCode : allMenuCodes){
		SysMenu menu = BizFrameMenuCache.getInstance().getSysMenu(UserMenuCache.getKindCode(), menuCode);
		if("xtype".equalsIgnoreCase(menu.getWindowType())){
			hasXtype = true;
		}
		uerMenuMap.put(menuCode,menu.getWindowType());
	}
%>
<% if (hasXtype) { %>
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/libs/ext-${initParam.extVersion}/resources/css/ext-all.css" />" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/libs/ext-${initParam.extVersion}/ux/css/ux-all.css" />" />
<link rel="stylesheet" href="<c:url value="/static/styles/styles.css" />" type="text/css" />
<link rel="stylesheet" href="<c:url value="/static/styles/icons.css" />" type="text/css" />
<link rel="stylesheet" href="<c:url value="/static/styles/GridSummary.css" />" type="text/css" />
<link rel="stylesheet" href="<c:url value="/static/styles/ext-patch.css" />" type="text/css" />

<script type="text/javascript"
	src="<c:url value="/static/libs/ext-${initParam.extVersion}/adapter/ext/ext-base-debug.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/libs/ext-${initParam.extVersion}/ext-all-debug.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/libs/ext-${initParam.extVersion}/ux/ux-all-debug.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/libs/ux/miframe-debug.js" />"></script>
<script type="text/javascript" src="<c:url value="/app/api-debug.js" />"></script>
<script type="text/javascript"
	src="<c:url value="/static/libs/ext-${initParam.extVersion}/src/locale/ext-lang-zh_CN.js" />"></script>

<script type="text/javascript" src="<c:url value="/static/scripts/ux/init.js" />"></script>

<script type="text/javascript" src="<c:url value="/static/scripts/App.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/App.config.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/App.utils.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/App.view.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/GridExporter.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/GridSummary.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysGridPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysTabPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysPortalPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysWin.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysWinForView.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/GroupingSelectGridView.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/GroupPagingToolbar.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/util/Format.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/util/HsString.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/util/HsUtils.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/util/MathUtil.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/CheckTreeGridNodeUI.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/Select.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/TriggerField.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/TreeCheckNodeUI.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/TriggerTreeSelectField.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/SysFormPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ux/Enter2Tab.js" />"></script>

<script type="text/javascript" src="<c:url value="/static/scripts/widget/SimpleSelect.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/ReportSelect.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/PopupTextArea.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/UnitField.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/ItemSelect.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/AmCharts.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/CustomVTypes.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/DateRangeSelect.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/widget/DictSelect.js" />"></script>

<script type="text/javascript" src="<c:url value="/static/fusionCharts/FusionCharts.js" />"></script>

<% if(needInclude(uerMenuMap, "rmDict")) { %>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/dict/DictManager.js" />"></script>
<% } %>

<% if(needInclude(uerMenuMap, "rmParameter")) { %>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/bizparams/BizParams.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/bizparams/BizParamsEditForm.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/bizparams/BizParamsGrid.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/bizparams/BizParamsTree.js" />"></script>
<% } %>

<% if(needInclude(uerMenuMap, "rmLog")) { %>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/log/LogGridPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/log/LogQueryFormPanel.js" />"></script>
<% } %>

<% if(needInclude(uerMenuMap, "rmTradeDate")) { %>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/tradedate/TradeDateBottomFormPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/tradedate/TradeDateMain.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/tradedate/TradeDateMainGridPanel.js" />"></script>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/tradedate/TradeDateTopFormPanel.js" />"></script>
<% } %>

<% if(needInclude(uerMenuMap, "rmPromptRight")) { %>
<script type="text/javascript" src="<c:url value="/static/scripts/ui/system/prompt/PromptRight.js" />"></script>
<% } %>

<% } %>
<script type="text/javascript" charset="utf-8"> 
  Ext.BLANK_IMAGE_URL = "<c:url value="/static/libs/ext-${initParam.extVersion}/resources/images/default/s.gif" />";
</script>
